﻿<Window x:Class="TFSTools.TestManagement.TestCaseReview.TestPlanView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        
        Title="Select Test Plan" Height="400" Width="500" Activated="Window_Activated" Background="#FF343434" Foreground="White" ShowInTaskbar="False" ResizeMode="NoResize" WindowStartupLocation="CenterOwner" WindowStyle="None">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="50"></RowDefinition>
            <RowDefinition Height="50"></RowDefinition>
            <RowDefinition></RowDefinition>
            <RowDefinition Height="50"></RowDefinition>
        </Grid.RowDefinitions>
        <TextBlock Grid.Row="0" Text="Test Plans" VerticalAlignment="Bottom" Margin="12,10" FontSize="20" Foreground="#FFC6E5F6" />
        <Grid Grid.Row="1" Margin="10">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="auto" />
                <ColumnDefinition />
                <ColumnDefinition Width="auto" />
            </Grid.ColumnDefinitions>
            <Label Grid.Column="0" Content="Connection:" Margin="3" Foreground="White"></Label>
            <TextBox x:Name="tbxTFSServerInfo" Grid.Column="1" Margin="3" IsReadOnly="True" Text="Click 'Connect...'"></TextBox>
            <Button x:Name="btnConnect" Grid.Column="2" Content="Connect..." Margin="3" Padding="10,1" Click="ConnectButton_Click"></Button>
        </Grid>
        <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Right" Margin="10" >
            <Button x:Name="btnSelectPlan" Content="Select Plan" Margin="3" Padding="10,1" Click="SelectPlanButton_Click" IsEnabled="False"  />
            <Button x:Name="btnCancel" Content="Cancel" Margin="3" Padding="10,1" IsCancel="True" />
        </StackPanel>
        <DataGrid x:Name="dgTestPlans" 
                  Grid.Row="2" 
                  Margin="10,0"
                  AutoGenerateColumns="False"
                  CanUserAddRows="False"
                  CanUserDeleteRows="False"
                  CanUserResizeRows="False"
                  RowHeaderWidth="0"
                  ScrollViewer.CanContentScroll="True"
                  ScrollViewer.VerticalScrollBarVisibility="Auto"
                  ScrollViewer.HorizontalScrollBarVisibility="Auto"
                  SelectionUnit="FullRow" SelectionMode="Single" SelectionChanged="TestPlansGrid_SelectionChanged" MouseDoubleClick="TestPlansGrid_MouseDoubleClick">

            <DataGrid.Columns>
                <DataGridTextColumn Header="ID"
                                    Binding="{Binding Path=Id, Mode=OneWay}"
                                    CanUserSort="True"
                                    MinWidth="30"
                                    Width="40" />
                <DataGridTextColumn Header="Name"
                                    Binding="{Binding Path=Name, Mode=OneWay}"
                                    CanUserSort="True"
                                    SortDirection="Ascending"
                                    MinWidth="80"
                                    Width="*" />
                <DataGridTextColumn Header="Owner"
                                    Binding="{Binding Path=Owner, Mode=OneWay}"
                                    CanUserSort="True"
                                    MinWidth="70"
                                    Width="120" />
                <DataGridTextColumn Header="End Date"
                                    Binding="{Binding Path=EndDate, Mode=OneWay, StringFormat=dd/MM/yyyy}"
                                    CanUserSort="True"
                                    MinWidth="70"
                                    Width="120" />
            </DataGrid.Columns>
        </DataGrid>
    </Grid>
</Window>
